#include "complex.h"

int main()
{
  ComplexLink *node1 = BuyNode(1);
  ComplexLink *node2 = BuyNode(2);
  ComplexLink *node3 = BuyNode(3);
  ComplexLink *node4 = BuyNode(4);
  node1->next = node2;
  node1->random = node3;

  node2->next = node3;
  node2->random = node2;

  node3->next = node4;
  node3->random = node4;

  ComplexLink *cur = CopyComplexLink(node1);
  while(cur)
  {
    printf("%d ",cur->data);
    cur = cur->next;
  }
  printf("\n");
  return 0;
}
